home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
drdobbs
/
ddjcompr
/
hstest
/
src
/
pq.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-07
|
491b
|
20 lines
typedef struct PQ
{
char *heap;
char *bottom;
int nitems;
int maxitem;
int itemsize;
int (*cmp)();
int (*swap)();
} PQ;
extern void reheap_down(struct PQ *p);
extern void reheap_up(struct PQ *p);
extern struct PQ *pq_create(int numele,int elesize,int (*cmp)(),void (*swap)(),void *initheap);
extern int pq_ins(struct PQ *p,void *item);
extern int pq_del(struct PQ *p,void *target);
extern char *pq_look(struct PQ *p);
extern int pq_numele(struct PQ *p);